/*
Navicat Oracle Data Transfer
Oracle Client Version : 10.2.0.5.0

Source Server         : 38o
Source Server Version : 110200
Source Host           : 192.168.1.38:1521
Source Schema         : OMS_SOURCE

Target Server Type    : ORACLE
Target Server Version : 110200
File Encoding         : 65001

Date: 2017-11-07 16:29:01
*/


-- ----------------------------
-- Table structure for TAG_T
-- ----------------------------
DROP TABLE "OMS_SOURCE"."TAG_T";
CREATE TABLE "OMS_SOURCE"."TAG_T" (
"ID" NUMBER NOT NULL ,
"TAG" VARCHAR2(255 BYTE) NULL ,
"SCORE" NUMBER NULL ,
"HOT" NUMBER NULL ,
"CREATE_TIME" TIMESTAMP(0)  NULL ,
"UPDATE_TIME" TIMESTAMP(0)  NULL ,
"PROTECTED_TIME" TIMESTAMP(0)  NULL ,
"GROUP_ID" NUMBER NULL ,
"CLASS_ID" NUMBER NULL 
)
LOGGING
NOCOMPRESS
NOCACHE

;

-- ----------------------------
-- Triggers structure for table TAG_T
-- ----------------------------
CREATE OR REPLACE TRIGGER "OMS_SOURCE"."TRIGGER_TAG_T" BEFORE INSERT ON "OMS_SOURCE"."TAG_T" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW ENABLE
begin      
        select TAG_SEQ.Nextval into :NEW.ID from dual;      
    end;
-- ----------------------------
-- Checks structure for table TAG_T
-- ----------------------------
ALTER TABLE "OMS_SOURCE"."TAG_T" ADD CHECK ("ID" IS NOT NULL);
